﻿using Brc_PaaS.Common.Model.Apollo;
using Brc_PaaS.Common.Model.Basic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Brc_PaaS.Core.Apollo.Service
{
   public interface IApolloConfigService
    {
        /// <summary>
        /// 新增配置接口
        /// </summary>
        /// <param name="configInfoDto"></param>
        /// <returns></returns>
        ResponseModel<ConfigInfoDto> AddConfig(CreateOrUpdateConfigInfoDto configInfoDto);
        /// <summary>
        /// 修改配置接口
        /// </summary>
        /// <param name="configInfoDto"></param>
        BaseResponseModel UpdateConfig(CreateOrUpdateConfigInfoDto configInfoDto);
        /// <summary>
        /// 删除配置接口
        /// </summary>
        /// <param name="deleteConfigDto"></param>
        BaseResponseModel DeleteConfig(DeleteConfigDto deleteConfigDto);
        /// <summary>
        /// 发布配置接口
        /// </summary>
        /// <param name="conditionDto"></param>
        /// <returns></returns>
        ResponseModel<ReleaseConfigInfoDto> ReleaseConfig(ReleaseConfigConditionDto conditionDto);
        /// <summary>
        /// 获取某个Namespace当前生效的已发布配置接口
        /// </summary>
        /// <param name="conditionDto"></param>
        /// <returns></returns>
        ResponseModel<ReleaseConfigInfoDto> GetEffectiveConfigInfo(SingleNamespaceConditionDto conditionDto);

    }
}
